<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
<div></div>
</body>
<script>
   function Parent(name){
        this.name = name
        this.arr = [1,2,3]
    }
    Parent.prototype.say = function(){
        console.log(this.name);
    }
    function Child(name,age){
        Parent.call(this,name)
        this.age = age
    } 

    Child.prototype = new Parent()
    let child1 = new Child("momo",25)
    child1.arr.push(4)
    console.log(child1);
    let child2 = new Child("bb",24)
    console.log(child2)
    child2.say();
</script>

</html>